package wb_view;

import java.awt.BorderLayout;
import java.awt.EventQueue;

import javax.swing.JFrame;
import javax.swing.JPanel;
import javax.swing.border.EmptyBorder;
import javax.swing.JTextField;
import javax.swing.JButton;
import javax.swing.SwingConstants;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import javax.swing.JLabel;

import model.ParkingAreaManager;


public class CarLocation extends JFrame {

	private JPanel contentPane;
	private JButton jbtnOK;
	private JLabel jlabellocation;
	



	/**
	 * Create the frame.
	 */
	public CarLocation(String carNum) {
		setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		setBounds(100, 100, 400, 150);
		contentPane = new JPanel();
		contentPane.setBorder(new EmptyBorder(5, 5, 5, 5));
		setContentPane(contentPane);
		contentPane.setLayout(null);
		
		jbtnOK = new JButton("\uD655\uC778");
		jbtnOK.setBounds(154, 79, 97, 23);
		contentPane.add(jbtnOK);
		
		JLabel jlabellocation = new JLabel("");
		jlabellocation.setBounds(45, 30, 307, 20);
		
		contentPane.add(jlabellocation);
		jlabellocation.setText("차량"+ carNum+"은" +ParkingAreaManager.getInstance().getCarLocation(carNum)+"에 주차되어 있습니다.");
		
		
		
		ActionListener al = new ActionListener()
		{
			public void actionPerformed(ActionEvent ae)
			{
				
				
				
				if(ae.getSource()==jbtnOK) //Ȯ��(�ݱ�)��ư
				{
					dispose();
				}
				
			}
			
				
		};
		jbtnOK.addActionListener(al);
		
		
	}
}
